import { getToken, login, promisify, showLoading, hideLoading } from "./comon";
import { memberInfo } from "./user";
let type = getApp().type
let host = getApp().host;

let addNotifyUrl = `${host}/user/adNotify`
let getUserInfoUrl = `${host}/user/getUserInfo`


let addNotifyRequest = async function() {
    let options = {
        url: addNotifyUrl,
        method: 'POST',
        data: {
            type
        },
        header: {
            token: getToken()
        }
    }
    let res = await promisify(tt.request, options)
    return res.data;
}

let getUserInfoRequest = async function() {
    let options = {
        url: getUserInfoUrl,
        method: 'GET',
        header: {
            token: getToken()
        }
    }
    let res = await promisify(tt.request, options)
    return res.data;
}



export {
    addNotifyRequest,
    getUserInfoRequest
}